import request from "@/utils/request";

// 查询入驻商家列表
export function listStore(query) {
  return request({
    url: "/ds/store/list",
    method: "get",
    params: query,
  });
}

// 查询入驻商家详细
export function getStore(id) {
  return request({
    url: "/ds/store/" + id,
    method: "get",
  });
}

// 新增入驻商家
export function addStore(data) {
  return request({
    url: "/ds/store",
    method: "post",
    data: data,
  });
}

// 修改入驻商家
export function updateStore(data) {
  return request({
    url: "/ds/store",
    method: "put",
    data: data,
  });
}

// 删除入驻商家
export function delStore(id) {
  return request({
    url: "/ds/store/" + id,
    method: "delete",
  });
}

export function addVisit(data) {
  return request({
    url: "/ds/visit",
    method: "post",
    data: data,
  });
}

export function listVisit(query) {
  return request({
    url: "/ds/visit/list",
    method: "get",
    params: query,
  });
}
